import { App } from 'vue'
import { Button, Tooltip, Modal, Spin, Drawer, Layout, Form, DatePicker, Menu, Input, Select, Checkbox, Radio, Cascader, TreeSelect, InputNumber, Transfer, Table as antTable, Tree, Row, Col, Pagination } from 'ant-design-vue'
import {
  Header,
  Column,
  Table,
  Grid,
  Toolbar,
  Pager as VxePager,
  Filter,
  Tooltip as VxeTooltip,
  Icon as VxeIcon,
  Button as VxeButton,
  Select as VxeSelect,
  Modal as VxeModal,
  Input as VxeInput
} from 'vxe-table'
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const registComponent = (app: App) => {
  const componentList = [
    ...[Header, Column, Table, Grid, Toolbar, Filter, VxeTooltip, VxeIcon, VxeButton, VxeSelect, VxeModal, VxeInput, VxePager],
    ...[Button, Tooltip, Modal, Spin, Drawer, Menu, Layout, Form, DatePicker, Input, Select, Checkbox, Radio, Cascader, TreeSelect, InputNumber, Transfer, antTable, Tree, Row, Col, Pagination]
  ]
  componentList.forEach(item => {
    app.component(item.name, item)
  })
}
